﻿/* ----------------------------------------------------------------------------
 * Copyright (c) Rob Ashton 2009
 *
 * This source code is subject to terms and conditions of the Microsoft Public 
 * License (Ms-PL).
 * 
 * By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 * 
 * To request a copy of the Microsoft Public License, send a request by email
 * to license@mvcex.com
 *
 * This notice must not be removed from this software.
 * ---------------------------------------------------------------------------- */


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

using MvcEx;
using MvcEx.Controllers;
using site.lib;

namespace site.core.Controllers
{
    [MvcExActionContainer("Home")]
    public class Home : MvcExActionContainer
    {
        private ITestService mService;

        public Home(ITestService service)
        {
            mService = service;
        }

        public ActionResult Index()
        {
            return View();
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Index(IndexViewModel model)
        {
            return View(model);
        }

        public class IndexViewModel
        {
            public String Text
            {
                get;
                set;
            }
        }

        public String TestPartialDynamic()
        {
            return "Hello World";
        }
    }
}
